<?php
namespace Admin\Controller;
use Think\Controller;
class IndexController extends CommonController {
	//首页
    public function index()
    {
        $sql = 'select * from admin where id='.$_SESSION['id'];
        $admininfo = M()->query($sql);
        $this->assign('admininfo',current($admininfo));

        $this->display();
    }

    //欢迎welcome页面
    public function welcome()
    {
        //获取后台用户信息
        $sql = 'select * from admin where id='.$_SESSION['id'];
        $admininfo = M()->query($sql);
        $admininfo = current($admininfo);
        $this->assign('admininfo',$admininfo);
        
    	$this->display();
    }
}